package ae.pcfc.etks.cld.service.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * User entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_USER", schema = "ETKS_ONLINE_DBA", uniqueConstraints = {
		@UniqueConstraint(columnNames = {"U_ID", "U_USERNAME", "U_EMAIL"})})		
@SequenceGenerator(name = "SQ_ETKS_USER", sequenceName = "SQ_ETKS_USER", initialValue = 1, allocationSize = 1)
public class User implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 7866133061739609037L;
	private Long UId;
	private String UNameEng;
	private String UNameArb;
	private String UUsername;
	private String UPassword;
	private Long USecretAnsId;
	private String USecretAns;
	private String UMobile;
	private String UEmail;
	private String USmsNotification;
	private String UEmailNotification;
	private String UType;
	private String UStatus;
	private Date UCreateDate;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String UNameEng, String UNameArb, String UUsername,
			String UPassword, Long USecretAnsId, String USecretAns, String UMobile, String UEmail,
			String UType, String UStatus, Date UCreateDate) {
		this.UNameEng = UNameEng;
		this.UNameArb = UNameArb;
		this.UUsername = UUsername;
		this.UPassword = UPassword;
		this.USecretAnsId = USecretAnsId;
		this.USecretAns = USecretAns;
		this.UMobile = UMobile;
		this.UEmail = UEmail;
		this.UType = UType;
		this.UStatus = UStatus;
		this.UCreateDate = UCreateDate;
	}

	/** full constructor */
	public User(String UNameEng, String UNameArb,
			String UUsername, String UPassword, Long USecretAnsId, 
			String USecretAns, String UMobile, String UEmail, 
			String USmsNotification, String UEmailNotification, 
			String UType, String UStatus,
			Date UCreateDate
			//,			
			//Set<UserAnnouncements> UserAnnouncementses
			) {

		this.UNameEng = UNameEng;
		this.UNameArb = UNameArb;
		this.UUsername = UUsername;
		this.UPassword = UPassword;
		this.USecretAnsId = USecretAnsId;
		this.USecretAns = USecretAns;
		this.UMobile = UMobile;
		this.UEmail = UEmail;
		this.USmsNotification = USmsNotification;
		this.UEmailNotification = UEmailNotification;
		this.UType = UType;
		this.UStatus = UStatus;
		this.UCreateDate = UCreateDate;
		//this.UserAnnouncementses = UserAnnouncementses;		
	}

	// Property accessors
	@Id
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_ETKS_USER")
	@Column(name = "U_ID", nullable = false, precision = 11, scale = 0)
	public Long getUId() {
		return this.UId;
	}

	public void setUId(Long UId) {
		this.UId = UId;
	}

	@Column(name = "U_NAME_ENG", nullable = false, length = 50)
	public String getUNameEng() {
		return this.UNameEng;
	}

	public void setUNameEng(String UNameEng) {
		this.UNameEng = UNameEng;
	}

	@Column(name = "U_NAME_ARB", nullable = false, length = 50)
	public String getUNameArb() {
		return this.UNameArb;
	}

	public void setUNameArb(String UNameArb) {
		this.UNameArb = UNameArb;
	}

	@Column(name = "U_USERNAME", nullable = false, length = 50)
	public String getUUsername() {
		return this.UUsername;
	}

	public void setUUsername(String UUsername) {
		this.UUsername = UUsername;
	}

	@Column(name = "U_PASSWORD", nullable = false, length = 50)
	public String getUPassword() {
		return this.UPassword;
	}

	public void setUPassword(String UPassword) {
		this.UPassword = UPassword;
	}

	@Column(name = "U_SEC_ANS_ID", nullable = false, precision = 11, scale = 0)
	public Long getUSecretAnsId() {
		return USecretAnsId;
	}

	public void setUSecretAnsId(Long uSecretAnsId) {
		USecretAnsId = uSecretAnsId;
	}

	@Column(name = "U_SECRET_ANS", nullable = false, length = 100)
	public String getUSecretAns() {
		return this.USecretAns;
	}

	public void setUSecretAns(String USecretAns) {
		this.USecretAns = USecretAns;
	}

	@Column(name = "U_MOBILE", nullable = false, length = 25)
	public String getUMobile() {
		return this.UMobile;
	}

	public void setUMobile(String UMobile) {
		this.UMobile = UMobile;
	}

	@Column(name = "U_EMAIL", nullable = false, length = 50)
	public String getUEmail() {
		return this.UEmail;
	}

	public void setUEmail(String UEmail) {
		this.UEmail = UEmail;
	}

	@Column(name = "U_SMS_NOTIFICATION", length = 1)
	public String getUSmsNotification() {
		return this.USmsNotification;
	}

	public void setUSmsNotification(String USmsNotification) {
		this.USmsNotification = USmsNotification;
	}

	@Column(name = "U_EMAIL_NOTIFICATION", length = 1)
	public String getUEmailNotification() {
		return this.UEmailNotification;
	}

	public void setUEmailNotification(String UEmailNotification) {
		this.UEmailNotification = UEmailNotification;
	}

	@Column(name = "U_TYPE", nullable = false, length = 1)
	public String getUType() {
		return this.UType;
	}

	public void setUType(String UType) {
		this.UType = UType;
	}

	@Column(name = "U_STATUS", nullable = false, length = 1)
	public String getUStatus() {
		return this.UStatus;
	}

	public void setUStatus(String UStatus) {
		this.UStatus = UStatus;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "U_CREATE_DATE", nullable = false, length = 7)
	public Date getUCreateDate() {
		return this.UCreateDate;
	}

	public void setUCreateDate(Date UCreateDate) {
		this.UCreateDate = UCreateDate;
	}
}